package com.company.demo.strategy.impl;

import com.company.demo.pojo.WxBlance;
import com.company.demo.pojo.WxTrade;
import com.company.demo.strategy.IDeduction;

public class BlanceDeductionImpl implements IDeduction {
    @Override
    public boolean exec(WxBlance wxBlance, WxTrade wxTrade) {
        if (wxBlance.getBlance().compareTo(wxTrade.getTradeAmout()) >= 0) {
            wxTrade.setUserAmout(wxBlance.getBlance());
        }
        return true;
    }
}
